<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="org.springside.core.Constants,cn.firstsoft.firstframe.admin.PropertyFile"%>
<%@ include file="/common/taglibs2.jsp"%>
<%
	session.setAttribute("messageTimes", "0");
%>
<fmt:message key="header_menu_message" var="header_menu_message" />
<fmt:message key="header_menu_email" var="header_menu_email" />
<fmt:message key="header_menu_forum" var="header_menu_forum" />
<fmt:message key="header_menu_address" var="header_menu_address" />
<fmt:message key="header_menu_setting" var="header_menu_setting" />
<fmt:message key="header_menu_help" var="header_menu_help" />
<fmt:message key="header_menu_exit" var="header_menu_exit" />

<fmt:message key="header_link_hint" var="header_link_hint" />
<fmt:message key="header_shortcut_1" var="header_shortcut_1" />
<fmt:message key="header_shortcut_2" var="header_shortcut_2" />
<fmt:message key="header_shortcut_3" var="header_shortcut_3" />
<fmt:message key="header_show_hide" var="header_show_hide" />
<style>
<!--

a.index:link {font-size:9pt;color:#003683;text-decoration:none;}
a.index:visited {font-size:9pt;color:#003683;text-decoration:none;}
a.index:hover {font-size:9pt;color:#003683;text-decoration:none;}
a.index:active {font-size:9pt;color:#003683;text-decoration:none;}
#dialog {
	float: left;
	background-color: #FFF;
	position: absolute;
	z-index: 995;
	overflow-y:auto;
}
#blackdiv {
	z-index: 994;
	filter: alpha(opacity = 30);
	-moz-opacity:0.3;
	-khtml-opacity: 0.3;
	opacity: 0.3;
	left: 0px;
	width: 100%;
	position: absolute;
	top: 0px;
	background-color: black;
	height: 100%;
}
#topDialog {
	float: left;
	background-color: #FFF;
	position: absolute;
	z-index: 997;
}
#topBlackdiv {
	z-index: 996;
	filter: alpha(opacity = 30);
	-moz-opacity:0.3;
	-khtml-opacity: 0.3;
	opacity: 0.3;
	left: 0px;
	width: 100%;
	position: absolute;
	top: 0px;
	background-color: black;
	height: 100%;
}
#readBlackdiv {
	z-index: 998;
	filter: alpha(opacity = 1);
	-moz-opacity:0.3;
	-khtml-opacity: 0.3;
	opacity: 0.3;
	left: 0px;
	width: 100%;
	position: absolute;
	top: 0px;
	height: 100%;
	background-color: #fff;
}
-->
</style>
<SCRIPT language=javascript>
function reinitIframeHeight(){
	var pTar = document.getElementById("dialogIframe");
	try{
	　　if (pTar) {
		　　if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight) {
		　　		pTar.height = pTar.contentDocument.body.offsetHeight;
		　　}
		　　else if (pTar.Document && pTar.Document.body.scrollHeight) {
		　　		pTar.height = pTar.Document.body.scrollHeight;
		　　}
	　　}
	}catch (ex){}
}

function getDialogScrollPos(){
	return document.getElementById("dialog").scrollTop;
}

var scrollVal = 0;
function reinitTreeDivTop(){
	var scrollPos = 192;
	if(getDialogScrollPos() > 75){
		scrollPos = getDialogScrollPos()+115;
	}
	dialogIframe.document.getElementById("portal_layout_left").style.top = scrollPos-scrollVal;
}
</script>
<div id="dialog" style="display: none;" onScroll="reinitTreeDivTop()">
	<iframe id="dialogIframe" src="" style="width: 986; " frameborder="0" scrolling="no"></iframe>
</div>
<div id="blackdiv" style="display: none;"></div>

<c:if test="${empty param.portalviewwin}">
<div id="topDialog" style="display: none;">
	<iframe id="topDialogIframe" src="" style="width: 100%; height: 100%" frameborder="0" scrolling="auto"></iframe>
</div>
<div id="topBlackdiv" style="display: none;"></div>
</c:if>

<div id="readBlackdiv" style="display: none;"></div>

<link href="<c:url value="/themes/portlet/portlet.css"></c:url>" type="text/css" rel=stylesheet>
<html>
	<head>
		<title><fmt:message key="head.title" /> -
			${sessionScope.loginUser.name}<c:if test="${!empty sessionScope.COMPANY_NAME}">(${sessionScope.COMPANY_NAME})</c:if></title>
		<%@ include file="/common/meta.jsp"%>
		<link href="<c:url value="/themes/${sessionScope.loginUser.theme}/style.css"/>" type="text/css" rel=stylesheet>
		<c:if test="${sessionScope.loginUser.theme=='mskin'}">
		<link href="<c:url value="/themes/${sessionScope.loginUser.theme}/skin/${sessionScope.loginUser.themePath}/css/style.css"/>" type="text/css" rel=stylesheet>
		</c:if>
		<SCRIPT language=javascript src="<c:url value="/themes/${sessionScope.loginUser.theme}/cookie.js"/>"></SCRIPT>
		<SCRIPT language=javascript src="<c:url value="/scripts/admin.js"/>"></SCRIPT>
	</head>
	<c:set var="modulenum" value="10" />
	<body   <c:if test="${param.method ne 'postil' && param.method ne 'online'}"> onunload="ecpexit();"</c:if>
	<c:if test="${param.method=='postil' or param.method=='online'}">onload="load();" onunload="unload();" onbeforeunload="beforeunload();"</c:if>>


<SCRIPT language=javascript>

function hideLeftCol(id){
	toggleMenu();
}

function hideHeader(){

	if(this.document.getElementById('header_logo').style.display=='none'){
		this.document.getElementById('header_logo').style.display='inline';
		this.document.getElementById('header_module_menu').style.display='inline';

		Set_Cookie('showHeader','true',30,'/','','');
		var showHeader = Get_Cookie('showHeader');
		document['header_img'].src = '../../themes/${sessionScope.loginUser.theme}/skin/${sessionScope.loginUser.themePath}/images/basic_search.gif';
	}else{
		this.document.getElementById('header_logo').style.display='none';
		this.document.getElementById('header_module_menu').style.display='none';

		Set_Cookie('showHeader','false',30,'/','','');
		var showHeader = Get_Cookie('showHeader');
		document['header_img'].src = '../../themes/${sessionScope.loginUser.theme}/skin/${sessionScope.loginUser.themePath}/images/advanced_search.gif';

	}
}

function showSubMenu(id){
	if(this.document.getElementById( id).style.display=='none'){
		tbButtonMouseOver('HideHandle',event.clientY,'',10);
	}
}


function ecpexit(){
 //增加判断，避免页面有iframe时导致session失效
 if(event.clientX>document.body.clientWidth && window.top.parent==undefined){
	   jQuery.ajax({
				url: '<c:url value="/modules/portlet/portletService.do?method=ecpExit&openwin=true"/>',
				dataType:'json',
				async:false, 
				cache : false,
				success: function(data){}
	　  });
    }
 }


</SCRIPT>

<%
	if(request.getLocale().toString().toLowerCase().startsWith("en")){%>
		<c:set var="languages" value="english" />
	<%
	}else if(request.getLocale().toString().equalsIgnoreCase("zh_hk") || request.getLocale().toString().equalsIgnoreCase("zh_tw") || request.getLocale().toString().equalsIgnoreCase("zh_mo")){
	%>
		<c:set var="languages" value="complexChinese" />
	<%
	}else{
	%>
		<c:set var="languages" value="simpleChinese" />
	<%
	}
%>
		<c:set var="modulecount" value="0" />

<script type="text/javascript" language="javascript">
var count = 0;
var servletPath = "<%=request.getServletPath() %>";
function getSystemMessage() {
    var myAjax = new Ajax.PeriodicalUpdater(
        'systemMessage',
        '<c:url value="/messages.do?method=checker&action=${param.method}&inboxId=${(empty param.inboxId)?(param.id):(param.inboxId)}&servletPath="/>' + servletPath,
        {
            method: 'get',
            evalScripts: true,
            frequency: <%=Constants.MESSAGE_CHECK_INTERVAL%>
        }
    );
}
getSystemMessage();
</script>
<div id="systemMessage" style="display: none"></div>
<script language="javascript" type="text/javascript">
	function toggleMenu()
	{
		if($('divshowMenu').style.display=="none")
		{
			$('divshowMenu').style.display="block";
			$('togglebtn').src="../../themes/${sessionScope.loginUser.theme}/skin/${sessionScope.loginUser.themePath}/images/toggle_bar_left.gif";
			$('maincenter').style.width='';
		}
		else
		{
			$('divshowMenu').style.display="none";
			$('togglebtn').src="../../themes/${sessionScope.loginUser.theme}/skin/${sessionScope.loginUser.themePath}/images/toggle_bar_right.gif";
			$('maincenter').style.width='100%';
		}
	}

</script>
<!--	 -->
<c:set var="eas" value="<%=Constants.EAS%>"/>
<c:set var="integrationStyle" value="<%=Constants.INTEGRATION_STYLE_EAS%>"/>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="oaframetable">

<tr height="23">
	<td width="100%">
		<%
			String topHeight = PropertyFile.readValue("firstframe.properties", "setting.top.height"); 
			if(topHeight == null){
				topHeight = Constants.DEFAULT_TOP_HEIGHT; 
			}
			if(Constants.EAS.equalsIgnoreCase("true") && Constants.INTEGRATION_STYLE_EAS.equals("2") && (session.getAttribute("loginFrom") == null || !session.getAttribute("loginFrom").equals("oa"))){
				topHeight = "25";
			}
		%>
		<table style="height:<%=topHeight %>px;width:100%;" class="top_bg" cellSpacing=0 cellPadding=0>
			<c:if test="${!eas || (eas&&integrationStyle!=2) || (eas && integrationStyle==2 && sessionScope.loginFrom == 'oa')}">
				<tr valign="top">
					<td>
						
							<jsp:include page="header_top.jsp" />
						
					</td>
				</tr>
			</c:if>
			<tr valign="bottom">
				<td>
					<jsp:include page="header_tab.jsp" />
					<BGSOUND id="messageSound" LOOP="1" SRC="<c:url value="/themes/${sessionScope.loginUser.theme}/sounds/jsilence.mid"/>">
				</td>
			</tr>
		</table>

		
		<%-- 
		<Div style="height:<%=topHeight %>px;" <c:if test="${!eas||(eas&&integrationStyle!=2)}"> id="Header" </c:if>>
		<c:if test="${!eas||(eas&&integrationStyle!=2)}">
			<jsp:include page="header_top.jsp" />
		</c:if>
		</Div>
		--%>
	</td>
</tr>

<%-- 
<tr height="23">
	<td width="100%">
		<jsp:include page="header_tab.jsp" />
		<BGSOUND id="messageSound" LOOP="1" SRC="<c:url value="/themes/${sessionScope.loginUser.theme}/sounds/jsilence.mid"/>">
	</td>
</tr>--%>
	<!--//header-->

<tr>
	<td width="100%" valign="top" height="100%">

<!--
<Div id="Main">
		<TABLE class="fixheader"><tr><td></td></tr></TABLE>
		-->
		<c:if test="${currentmodule != 'home' && currentmodule != 'portal'}">
		<TABLE height="4" cellspacing="0" cellpadding="0" border="0"><tr><td></td></tr></TABLE>
		</c:if>
		<TABLE id="menu_content"   cellSpacing=0 cellPadding=0   height="100%" width="100%" border=0>
			<TBODY>
				<TR>
					<td width="5">&nbsp;</td>
									<c:if test="${currentmodule != 'home' && currentmodule != 'portal'}">

										<td id="leftmenu" class="main_menu">
										<table  width="200" height="100%" id="divshowMenu" cellSpacing=0 cellPadding=0>
											<tr>
												<td vAlign=top>
												<jsp:include page="header_menu.jsp" />
												<jsp:include page="/menu.do?menu=${currentmodule}" />
												</td>
											</tr>
										</table>
										</td>
										<td class="split_line">
										   <div style="width:6px;height:100%;margin-top:200px">
											<a href="#"><img src="../../themes/${sessionScope.loginUser.theme}/skin/${sessionScope.loginUser.themePath}/images/toggle_bar_left.gif" name="img_swith" width="6" height="95" border="0" id="togglebtn" onClick="toggleMenu();" /></a>
										   </div>
										</td>
										<TD id="maincenter" class="main_center_module" style="padding-left: 4px;padding-right: 4px;border-top-width: 0px;border-left-width: 0px;border-right-width: 0px;">
									</c:if>
									<c:if test="${currentmodule == 'home' || currentmodule == 'portal'}">
										<TD class="main_center_portal">
									</c:if>
